<template>
	<view class="u-p-l-15 u-p-r-15">
		<!-- <textarea v-model="FeedBack.Description" auto-height /> -->
		<u-input class="margin-top bg-white"  placeholder="请输入您要咨询的内容" v-model="FeedBack.Description" :type="type" :border="border" :height="height"
		 :auto-height="autoHeight" />
		<view class="text-center margin-top">
			<button class="cu-btn bg-gradual-blue lg " style="width: 200px;" @tap="submit"> 提交 </button>
		</view>
	</view>
</template>

<script>
	import {
		feedback
	} from '@/api/feedback.js'
	export default {
		data() {
			return {
				FeedBack: {
					Description: '',
					Name: ''
				},
				type: 'textarea',
				border: true,
				height: 200,
				autoHeight: true,
			}
		},
		methods: {
			submit() {
				if (this.$store.state.vuex_user) {
					this.FeedBack.Name = this.$store.state.vuex_user.Name
				}
				feedback(this.FeedBack).then(res => {
					this.$u.toast('提交成功,客服会电话或微信与您联系，请注意接听')
					this.FeedBack.Description = ""
				}, err => {})
			}
		}
	}
</script>

<style>

</style>
